/**
 * 码牌表 api 封装
 *
 * @Author:    zhoujk
 * @Date:      2025-01-26 06:40:43
 * @Copyright  zzb
 */
import { postRequest } from '/@/lib/axios'

export const codeApi = {
  /**
   * 分页查询码牌
   */
  page: (param) => {
    return postRequest('/b-merchant/code/page', param)
  },

  /**
   * 作废码牌
   */
  updateCancel: (param) => {
    return postRequest('/b-merchant/code/update_cancel', param)
  },

  /**
   * 修改码牌状态入参
   */
  updateStatus: (param) => {
    return postRequest('/b-merchant/code/update_status', param)
  },

  /**
   * 码牌统计
   */
  count: (param) => {
    return postRequest('/b-merchant/code/count', param)
  },

  /**
   * 新增码牌
   */
  insert: (param) => {
    return postRequest('/b-merchant/code/insert', param)
  },

  /**
   * 修改启停
   */
  updateState: (param) => {
    return postRequest('/b-merchant/code/updateState', param)
  },

  /**
   * 新增验证码牌
   */
  insertCheck: (param) => {
    return postRequest('/b-merchant/code/insert_check', param)
  },
  /**
   * 删除证码牌
   */
  delete: (param) => {
    return postRequest('/b-merchant/code/delete', param)
  },
  /**
   * 绑定设备编码
   */
  bindDevice: (param) => {
    return postRequest('/b-merchant/code/bind_device', param)
  },
  /**
   * 绑定商户
   */
  bindMerchant: (param) => {
    return postRequest('/b-merchant/code/bind_merchant_id', param)
  },
  /**
   * 绑定门店
   */
  bindStore: (param) => {
    return postRequest('/b-merchant/code/bind_store_id', param)
  },

  /**
   * 码牌激活
   */
  activeCode: (param) => {
    return postRequest('/b-pay/code/active', param)
  },

  /**
   * 下载二维码
   */
  downloadCode: (param) => {
    return postRequest('/b-merchant/code/download', param)
  },
  /**
   * 收款二维码下载
   */
  downloadActive: (param) => {
    return postRequest('/b-merchant/code/download_active', param)
  },
  /**
   * 台卡验证
   */
  verify: (param) => {
    return postRequest('/b-merchant/code/verify', param)
  },
}
